package exception;
/**
 * 年龄不合法异常
 *
 * 自定义异常:
 * 通常用来说明因为不满足业务场景而导致的异常
 *
 * 自定义异常应满足以下几个要求:
 * 1:类名要做到见名知意
 * 2:是Exception的子类(不一定非要直接继承Exception)
 * 3:提供超类异常提供的所有构造器
 */
public class IllegalAgeException extends Exception{
    public IllegalAgeException() {
    }

    public IllegalAgeException(String message) {
        super(message);
    }

    public IllegalAgeException(String message, Throwable cause) {
        super(message, cause);
    }

    public IllegalAgeException(Throwable cause) {
        super(cause);
    }

    public IllegalAgeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
